(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
diff(X, Y) → if(leq(X, Y), n__0, n__s(n__diff(n__p(X), Y)))
0 → n__0
s(X) → n__s(X)
diff(X1, X2) → n__diff(X1, X2)
p(X) → n__p(X)
activate(n__0) → 0
activate(n__s(X)) → s(activate(X))
activate(n__diff(X1, X2)) → diff(activate(X1), activate(X2))
activate(n__p(X)) → p(activate(X))
activate(X) → X
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
activate(n__s(n__diff(X126897_3, X226898_3))) →+ s(if(leq(activate(X126897_3), activate(X226898_3)), n__0, n__s(n__diff(n__p(activate(X126897_3)), activate(X226898_3)))))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,0,0].
The pumping substitution is [X126897_3 / n__s(n__diff(X126897_3, X226898_3))].
The result substitution is [ ].
The rewrite sequence
activate(n__s(n__diff(X126897_3, X226898_3))) →+ s(if(leq(activate(X126897_3), activate(X226898_3)), n__0, n__s(n__diff(n__p(activate(X126897_3)), activate(X226898_3)))))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,2,0,0,0].
The pumping substitution is [X126897_3 / n__s(n__diff(X126897_3, X226898_3))].
The result substitution is [ ].
(2) BOUNDS(2^n, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
p(0') → 0'
p(s(X)) → X
leq(0', Y) → true
leq(s(X), 0') → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
diff(X, Y) → if(leq(X, Y), n__0, n__s(n__diff(n__p(X), Y)))
0' → n__0
s(X) → n__s(X)
diff(X1, X2) → n__diff(X1, X2)
p(X) → n__p(X)
activate(n__0) → 0'
activate(n__s(X)) → s(activate(X))
activate(n__diff(X1, X2)) → diff(activate(X1), activate(X2))
activate(n__p(X)) → p(activate(X))
activate(X) → X
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
p(0') → 0'
p(s(X)) → X
leq(0', Y) → true
leq(s(X), 0') → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
diff(X, Y) → if(leq(X, Y), n__0, n__s(n__diff(n__p(X), Y)))
0' → n__0
s(X) → n__s(X)
diff(X1, X2) → n__diff(X1, X2)
p(X) → n__p(X)
activate(n__0) → 0'
activate(n__s(X)) → s(activate(X))
activate(n__diff(X1, X2)) → diff(activate(X1), activate(X2))
activate(n__p(X)) → p(activate(X))
activate(X) → X
Types:
p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
0' :: n__0:n__p:n__diff:n__s
s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
leq :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → true:false
true :: true:false
false :: true:false
if :: true:false → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
activate :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__0 :: n__0:n__p:n__diff:n__s
n__s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
hole_n__0:n__p:n__diff:n__s1_3 :: n__0:n__p:n__diff:n__s
hole_true:false2_3 :: true:false
gen_n__0:n__p:n__diff:n__s3_3 :: Nat → n__0:n__p:n__diff:n__s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
leq,
activateThey will be analysed ascendingly in the following order:
leq < activate
(8) Obligation:
TRS:
Rules:
p(
0') →
0'p(
s(
X)) →
Xleq(
0',
Y) →
trueleq(
s(
X),
0') →
falseleq(
s(
X),
s(
Y)) →
leq(
X,
Y)
if(
true,
X,
Y) →
activate(
X)
if(
false,
X,
Y) →
activate(
Y)
diff(
X,
Y) →
if(
leq(
X,
Y),
n__0,
n__s(
n__diff(
n__p(
X),
Y)))
0' →
n__0s(
X) →
n__s(
X)
diff(
X1,
X2) →
n__diff(
X1,
X2)
p(
X) →
n__p(
X)
activate(
n__0) →
0'activate(
n__s(
X)) →
s(
activate(
X))
activate(
n__diff(
X1,
X2)) →
diff(
activate(
X1),
activate(
X2))
activate(
n__p(
X)) →
p(
activate(
X))
activate(
X) →
XTypes:
p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
0' :: n__0:n__p:n__diff:n__s
s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
leq :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → true:false
true :: true:false
false :: true:false
if :: true:false → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
activate :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__0 :: n__0:n__p:n__diff:n__s
n__s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
hole_n__0:n__p:n__diff:n__s1_3 :: n__0:n__p:n__diff:n__s
hole_true:false2_3 :: true:false
gen_n__0:n__p:n__diff:n__s3_3 :: Nat → n__0:n__p:n__diff:n__s
Generator Equations:
gen_n__0:n__p:n__diff:n__s3_3(0) ⇔ n__0
gen_n__0:n__p:n__diff:n__s3_3(+(x, 1)) ⇔ n__s(gen_n__0:n__p:n__diff:n__s3_3(x))
The following defined symbols remain to be analysed:
leq, activate
They will be analysed ascendingly in the following order:
leq < activate
(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol leq.
(10) Obligation:
TRS:
Rules:
p(
0') →
0'p(
s(
X)) →
Xleq(
0',
Y) →
trueleq(
s(
X),
0') →
falseleq(
s(
X),
s(
Y)) →
leq(
X,
Y)
if(
true,
X,
Y) →
activate(
X)
if(
false,
X,
Y) →
activate(
Y)
diff(
X,
Y) →
if(
leq(
X,
Y),
n__0,
n__s(
n__diff(
n__p(
X),
Y)))
0' →
n__0s(
X) →
n__s(
X)
diff(
X1,
X2) →
n__diff(
X1,
X2)
p(
X) →
n__p(
X)
activate(
n__0) →
0'activate(
n__s(
X)) →
s(
activate(
X))
activate(
n__diff(
X1,
X2)) →
diff(
activate(
X1),
activate(
X2))
activate(
n__p(
X)) →
p(
activate(
X))
activate(
X) →
XTypes:
p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
0' :: n__0:n__p:n__diff:n__s
s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
leq :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → true:false
true :: true:false
false :: true:false
if :: true:false → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
activate :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__0 :: n__0:n__p:n__diff:n__s
n__s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
hole_n__0:n__p:n__diff:n__s1_3 :: n__0:n__p:n__diff:n__s
hole_true:false2_3 :: true:false
gen_n__0:n__p:n__diff:n__s3_3 :: Nat → n__0:n__p:n__diff:n__s
Generator Equations:
gen_n__0:n__p:n__diff:n__s3_3(0) ⇔ n__0
gen_n__0:n__p:n__diff:n__s3_3(+(x, 1)) ⇔ n__s(gen_n__0:n__p:n__diff:n__s3_3(x))
The following defined symbols remain to be analysed:
activate
(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
activate(
gen_n__0:n__p:n__diff:n__s3_3(
n27_3)) →
gen_n__0:n__p:n__diff:n__s3_3(
n27_3), rt ∈ Ω(1 + n27
3)
Induction Base:
activate(gen_n__0:n__p:n__diff:n__s3_3(0)) →RΩ(1)
gen_n__0:n__p:n__diff:n__s3_3(0)
Induction Step:
activate(gen_n__0:n__p:n__diff:n__s3_3(+(n27_3, 1))) →RΩ(1)
s(activate(gen_n__0:n__p:n__diff:n__s3_3(n27_3))) →IH
s(gen_n__0:n__p:n__diff:n__s3_3(c28_3)) →RΩ(1)
n__s(gen_n__0:n__p:n__diff:n__s3_3(n27_3))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(12) Complex Obligation (BEST)
(13) Obligation:
TRS:
Rules:
p(
0') →
0'p(
s(
X)) →
Xleq(
0',
Y) →
trueleq(
s(
X),
0') →
falseleq(
s(
X),
s(
Y)) →
leq(
X,
Y)
if(
true,
X,
Y) →
activate(
X)
if(
false,
X,
Y) →
activate(
Y)
diff(
X,
Y) →
if(
leq(
X,
Y),
n__0,
n__s(
n__diff(
n__p(
X),
Y)))
0' →
n__0s(
X) →
n__s(
X)
diff(
X1,
X2) →
n__diff(
X1,
X2)
p(
X) →
n__p(
X)
activate(
n__0) →
0'activate(
n__s(
X)) →
s(
activate(
X))
activate(
n__diff(
X1,
X2)) →
diff(
activate(
X1),
activate(
X2))
activate(
n__p(
X)) →
p(
activate(
X))
activate(
X) →
XTypes:
p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
0' :: n__0:n__p:n__diff:n__s
s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
leq :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → true:false
true :: true:false
false :: true:false
if :: true:false → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
activate :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__0 :: n__0:n__p:n__diff:n__s
n__s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
hole_n__0:n__p:n__diff:n__s1_3 :: n__0:n__p:n__diff:n__s
hole_true:false2_3 :: true:false
gen_n__0:n__p:n__diff:n__s3_3 :: Nat → n__0:n__p:n__diff:n__s
Lemmas:
activate(gen_n__0:n__p:n__diff:n__s3_3(n27_3)) → gen_n__0:n__p:n__diff:n__s3_3(n27_3), rt ∈ Ω(1 + n273)
Generator Equations:
gen_n__0:n__p:n__diff:n__s3_3(0) ⇔ n__0
gen_n__0:n__p:n__diff:n__s3_3(+(x, 1)) ⇔ n__s(gen_n__0:n__p:n__diff:n__s3_3(x))
No more defined symbols left to analyse.
(14) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
activate(gen_n__0:n__p:n__diff:n__s3_3(n27_3)) → gen_n__0:n__p:n__diff:n__s3_3(n27_3), rt ∈ Ω(1 + n273)
(15) BOUNDS(n^1, INF)
(16) Obligation:
TRS:
Rules:
p(
0') →
0'p(
s(
X)) →
Xleq(
0',
Y) →
trueleq(
s(
X),
0') →
falseleq(
s(
X),
s(
Y)) →
leq(
X,
Y)
if(
true,
X,
Y) →
activate(
X)
if(
false,
X,
Y) →
activate(
Y)
diff(
X,
Y) →
if(
leq(
X,
Y),
n__0,
n__s(
n__diff(
n__p(
X),
Y)))
0' →
n__0s(
X) →
n__s(
X)
diff(
X1,
X2) →
n__diff(
X1,
X2)
p(
X) →
n__p(
X)
activate(
n__0) →
0'activate(
n__s(
X)) →
s(
activate(
X))
activate(
n__diff(
X1,
X2)) →
diff(
activate(
X1),
activate(
X2))
activate(
n__p(
X)) →
p(
activate(
X))
activate(
X) →
XTypes:
p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
0' :: n__0:n__p:n__diff:n__s
s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
leq :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → true:false
true :: true:false
false :: true:false
if :: true:false → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
activate :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__0 :: n__0:n__p:n__diff:n__s
n__s :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__diff :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
n__p :: n__0:n__p:n__diff:n__s → n__0:n__p:n__diff:n__s
hole_n__0:n__p:n__diff:n__s1_3 :: n__0:n__p:n__diff:n__s
hole_true:false2_3 :: true:false
gen_n__0:n__p:n__diff:n__s3_3 :: Nat → n__0:n__p:n__diff:n__s
Lemmas:
activate(gen_n__0:n__p:n__diff:n__s3_3(n27_3)) → gen_n__0:n__p:n__diff:n__s3_3(n27_3), rt ∈ Ω(1 + n273)
Generator Equations:
gen_n__0:n__p:n__diff:n__s3_3(0) ⇔ n__0
gen_n__0:n__p:n__diff:n__s3_3(+(x, 1)) ⇔ n__s(gen_n__0:n__p:n__diff:n__s3_3(x))
No more defined symbols left to analyse.
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
activate(gen_n__0:n__p:n__diff:n__s3_3(n27_3)) → gen_n__0:n__p:n__diff:n__s3_3(n27_3), rt ∈ Ω(1 + n273)
(18) BOUNDS(n^1, INF)